<!DOCTYPE html>
<meta charset="utf-8">
<html>
<head>
  <title>Vega Scaffold</title>
  <script src="http://d3js.org/d3.v3.min.js"></script>
  <script src="http://trifacta.github.com/vega/vega.js"></script>
  <!--<script src="http://trifacta.github.com/vega/d3.geo.projection.min.js"></script>-->
</head>
<body>
<div id="vis"></div>

<script type="text/javascript">
// parse a spec and create a visualization view
function parse(spec) {
  vg.parse.spec(spec, function(chart) { chart({el:"#vis"}).update(); });
}
  parse(JSON.parse('{\
  "width": 300,\
  "height": 480,\
  "data": [\
    {\
      "name": "table",\
      "values": [\
          {"dir":"0.9.12", "test":"Accessing float series via object series", "value":497387.50}, {"dir":"1.0.0", "test":"Accessing float series via object series", "value":100.00}, {"dir":"1.1.1-beta", "test":"Accessing float series via object series", "value":100.00}, {"dir":"0.9.12", "test":"Building a large (1M items) series from two arrays", "value":11710.00}, {"dir":"1.0.0", "test":"Building a large (1M items) series from two arrays", "value":100.00}, {"dir":"1.1.1-beta", "test":"Building a large (1M items) series from two arrays", "value":6298.00}, {"dir":"0.9.12", "test":"Creating large (10k) series from array", "value":568.03}, {"dir":"1.0.0", "test":"Creating large (10k) series from array", "value":100.00}, {"dir":"1.1.1-beta", "test":"Creating large (10k) series from array", "value":27.86}, {"dir":"0.9.12", "test":"Creating small (10) series from array", "value":292.53}, {"dir":"1.0.0", "test":"Creating small (10) series from array", "value":100.00}, {"dir":"1.1.1-beta", "test":"Creating small (10) series from array", "value":50.94}, {"dir":"0.9.12", "test":"Diff 20x10k frame by offset 10", "value":18535.94}, {"dir":"1.0.0", "test":"Diff 20x10k frame by offset 10", "value":100.00}, {"dir":"1.1.1-beta", "test":"Diff 20x10k frame by offset 10", "value":126.73}, {"dir":"0.9.12", "test":"Drop sparse rows from a large frame", "value":147.95}, {"dir":"1.0.0", "test":"Drop sparse rows from a large frame", "value":100.00}, {"dir":"1.1.1-beta", "test":"Drop sparse rows from a large frame", "value":47.22}, {"dir":"0.9.12", "test":"Drop sparse rows from a small frame", "value":169.09}, {"dir":"1.0.0", "test":"Drop sparse rows from a small frame", "value":100.00}, {"dir":"1.1.1-beta", "test":"Drop sparse rows from a small frame", "value":40.00}, {"dir":"0.9.12", "test":"Fill forward missing values in 100x10k frame", "value":132.39}, {"dir":"1.0.0", "test":"Fill forward missing values in 100x10k frame", "value":100.00}, {"dir":"1.1.1-beta", "test":"Fill forward missing values in 100x10k frame", "value":5.82}, {"dir":"0.9.12", "test":"Get frames columns and re-create frame", "value":17090.37}, {"dir":"1.0.0", "test":"Get frames columns and re-create frame", "value":100.00}, {"dir":"1.1.1-beta", "test":"Get frames columns and re-create frame", "value":93.33}, {"dir":"0.9.12", "test":"Group by column and subtract group averages", "value":418.58}, {"dir":"1.0.0", "test":"Group by column and subtract group averages", "value":100.00}, {"dir":"1.1.1-beta", "test":"Group by column and subtract group averages", "value":102.71}, {"dir":"0.9.12", "test":"Merge 10 frames of size 1k (repeated Merge)", "value":803.28}, {"dir":"1.0.0", "test":"Merge 10 frames of size 1k (repeated Merge)", "value":100.00}, {"dir":"1.1.1-beta", "test":"Merge 10 frames of size 1k (repeated Merge)", "value":310.15}, {"dir":"1.0.0", "test":"Merge 1000 ordered 1k long series (single Merge)", "value":100.00}, {"dir":"1.1.1-beta", "test":"Merge 1000 ordered 1k long series (single Merge)", "value":111.66}, {"dir":"1.0.0", "test":"Merge 1000 unordered 1k long series (single Merge)", "value":100.00}, {"dir":"1.1.1-beta", "test":"Merge 1000 unordered 1k long series (single Merge)", "value":142.08}, {"dir":"0.9.12", "test":"Merge 3 ordered 300k long series (repeating Merge)", "value":733.80}, {"dir":"1.0.0", "test":"Merge 3 ordered 300k long series (repeating Merge)", "value":100.00}, {"dir":"1.1.1-beta", "test":"Merge 3 ordered 300k long series (repeating Merge)", "value":128.98}, {"dir":"1.0.0", "test":"Merge 3 ordered 300k long series (single Merge)", "value":100.00}, {"dir":"1.1.1-beta", "test":"Merge 3 ordered 300k long series (single Merge)", "value":122.48}, {"dir":"0.9.12", "test":"Merge 3 unordered 300k long series (repeating Merge)", "value":827.66}, {"dir":"1.0.0", "test":"Merge 3 unordered 300k long series (repeating Merge)", "value":100.00}, {"dir":"1.1.1-beta", "test":"Merge 3 unordered 300k long series (repeating Merge)", "value":128.36}, {"dir":"1.0.0", "test":"Merge 3 unordered 300k long series (single Merge)", "value":100.00}, {"dir":"1.1.1-beta", "test":"Merge 3 unordered 300k long series (single Merge)", "value":122.23}, {"dir":"0.9.12", "test":"Merge 6 ordered 300k long series (repeating Merge)", "value":748.50}, {"dir":"1.0.0", "test":"Merge 6 ordered 300k long series (repeating Merge)", "value":100.00}, {"dir":"1.1.1-beta", "test":"Merge 6 ordered 300k long series (repeating Merge)", "value":132.19}, {"dir":"1.0.0", "test":"Merge 6 ordered 300k long series (single Merge)", "value":100.00}, {"dir":"1.1.1-beta", "test":"Merge 6 ordered 300k long series (single Merge)", "value":121.12}, {"dir":"0.9.12", "test":"Merge 6 unordered 300k long series (repeating Merge)", "value":948.78}, {"dir":"1.0.0", "test":"Merge 6 unordered 300k long series (repeating Merge)", "value":100.00}, {"dir":"1.1.1-beta", "test":"Merge 6 unordered 300k long series (repeating Merge)", "value":125.47}, {"dir":"1.0.0", "test":"Merge 6 unordered 300k long series (single Merge)", "value":100.00}, {"dir":"1.1.1-beta", "test":"Merge 6 unordered 300k long series (single Merge)", "value":126.03}, {"dir":"0.9.12", "test":"Numerical operators on 100x10k frame and series", "value":3289.20}, {"dir":"1.0.0", "test":"Numerical operators on 100x10k frame and series", "value":100.00}, {"dir":"1.1.1-beta", "test":"Numerical operators on 100x10k frame and series", "value":95.58}, {"dir":"0.9.12", "test":"Numerical operators on 10x10k frame and series", "value":2278.36}, {"dir":"1.0.0", "test":"Numerical operators on 10x10k frame and series", "value":100.00}, {"dir":"1.1.1-beta", "test":"Numerical operators on 10x10k frame and series", "value":104.59}, {"dir":"0.9.12", "test":"Numerical operators on 20x10k frame", "value":287.82}, {"dir":"1.0.0", "test":"Numerical operators on 20x10k frame", "value":100.00}, {"dir":"1.1.1-beta", "test":"Numerical operators on 20x10k frame", "value":70.83}, {"dir":"0.9.12", "test":"Realign 1M series according to a key array", "value":896.08}, {"dir":"1.0.0", "test":"Realign 1M series according to a key array", "value":100.00}, {"dir":"1.1.1-beta", "test":"Realign 1M series according to a key array", "value":122.00}, {"dir":"0.9.12", "test":"Resample 1M series using 100 blocks (backward)", "value":2473.14}, {"dir":"1.0.0", "test":"Resample 1M series using 100 blocks (backward)", "value":100.00}, {"dir":"1.1.1-beta", "test":"Resample 1M series using 100 blocks (backward)", "value":107.70}, {"dir":"0.9.12", "test":"Resample 1M series using 100 blocks (forward)", "value":2510.16}, {"dir":"1.0.0", "test":"Resample 1M series using 100 blocks (forward)", "value":100.00}, {"dir":"1.1.1-beta", "test":"Resample 1M series using 100 blocks (forward)", "value":109.99}, {"dir":"0.9.12", "test":"Resample 1M series using 10000 blocks", "value":1446.14}, {"dir":"1.0.0", "test":"Resample 1M series using 10000 blocks", "value":100.00}, {"dir":"1.1.1-beta", "test":"Resample 1M series using 10000 blocks", "value":94.78}, {"dir":"0.9.12", "test":"Resample 1M series using 10000 blocks (backward)", "value":1495.52}, {"dir":"1.0.0", "test":"Resample 1M series using 10000 blocks (backward)", "value":100.00}, {"dir":"1.1.1-beta", "test":"Resample 1M series using 10000 blocks (backward)", "value":100.06}, {"dir":"0.9.12", "test":"Resample 1M series using 10000 blocks (forward)", "value":1544.58}, {"dir":"1.0.0", "test":"Resample 1M series using 10000 blocks (forward)", "value":100.00}, {"dir":"1.1.1-beta", "test":"Resample 1M series using 10000 blocks (forward)", "value":98.29}, {"dir":"0.9.12", "test":"Shift 20x10k frame by offset 10", "value":168011.54}, {"dir":"1.0.0", "test":"Shift 20x10k frame by offset 10", "value":100.00}, {"dir":"1.1.1-beta", "test":"Shift 20x10k frame by offset 10", "value":96.15}, {"dir":"0.9.12", "test":"Stack values of a 1000x1000 frame", "value":491.29}, {"dir":"1.0.0", "test":"Stack values of a 1000x1000 frame", "value":100.00}, {"dir":"1.1.1-beta", "test":"Stack values of a 1000x1000 frame", "value":137.96}, {"dir":"0.9.12", "test":"Sum column using untyped rows", "value":1993.02}, {"dir":"1.0.0", "test":"Sum column using untyped rows", "value":100.00}, {"dir":"1.1.1-beta", "test":"Sum column using untyped rows", "value":46.77}, {"dir":"1.0.0", "test":"Take 500k elements from a 1M element series", "value":100.00}, {"dir":"1.1.1-beta", "test":"Take 500k elements from a 1M element series", "value":795.00}, {"dir":"0.9.12", "test":"Titanic survival rate based on gender (groupRowsBy)", "value":229.17}, {"dir":"1.0.0", "test":"Titanic survival rate based on gender (groupRowsBy)", "value":100.00}, {"dir":"1.1.1-beta", "test":"Titanic survival rate based on gender (groupRowsBy)", "value":41.90}, {"dir":"1.0.0", "test":"Titanic survival rate based on gender (pivotTable)", "value":100.00}, {"dir":"1.1.1-beta", "test":"Titanic survival rate based on gender (pivotTable)", "value":111.76}\
      ]\
    }\
  ],\
  "legends": [\
    {\
      "fill": "color",\
      "title": "Performance tests",\
      "properties": {\
        "symbols": {\
          "fillOpacity": {\
            "value": 0.5\
          },\
          "stroke": {\
            "value": "transparent"\
          }\
        }\
      }\
    }\
  ],\
  "scales": [\
    {\
      "name": "cat",\
      "type": "ordinal",\
      "range": "height",\
      "padding": 0.2,\
      "domain": {\
        "data": "table",\
        "field": "data.test"\
      }\
    },\
    {\
      "name": "val",\
      "range": "width",\
      "type": "linear",\
      "round": true,\
      "nice": true,\
      "clamp": true,\
      "domainMax": 200,\
      "domain": {\
        "data": "table",\
        "field": "data.value"\
      }\
    },\
    {\
      "name": "color",\
      "type": "ordinal",\
      "range": "category10" \
    }\
  ],\
  "axes": [\
    {\
      "type": "y",\
      "scale": "cat",\
      "tickSize": 0,\
      "tickPadding": 8\
    },\
    {\
      "type": "x",\
      "scale": "val",\
      "title": "Time (%)"\
    }\
  ],\
  "marks": [\
    {\
      "type": "group",\
      "from": {\
        "data": "table",\
        "transform": [\
          {\
            "type": "facet",\
            "keys": [\
              "data.test"\
            ]\
          }\
        ]\
      },\
      "properties": {\
        "enter": {\
          "y": {\
            "scale": "cat",\
            "field": "key"\
          },\
          "height": {\
            "scale": "cat",\
            "band": true\
          }\
        }\
      },\
      "scales": [\
        {\
          "name": "pos",\
          "type": "ordinal",\
          "range": "height",\
          "domain": {\
            "field": "data.dir"\
          }\
        }\
      ],\
      "marks": [\
        {\
          "type": "rect",\
          "properties": {\
            "enter": {\
              "y": {\
                "scale": "pos",\
                "field": "data.dir"\
              },\
              "height": {\
                "scale": "pos",\
                "mult": 0.8,\
                "band": true\
              },\
              "x": {\
                "scale": "val",\
                "field": "data.value"\
              },\
              "x2": {\
                "scale": "val",\
                "value": 0\
              },\
              "fill": {\
                "scale": "color",\
                "field": "data.dir"\
              }\
            }\
          }\
        },\
        {\
          "type": "text",\
          "properties": {\
            "enter": {\
              "y": {\
                "scale": "pos",\
                "field": "data.dir"\
              },\
              "dy": {\
                "scale": "pos",\
                "band": true,\
                "mult": 0.5\
              },\
              "x": {\
                "scale": "val",\
                "field": "data.value",\
                "offset": 4\
              },\
              "fill": {\
                "scale": "color",\
                "field": "data.dir"\
              },\
              "align": {\
                "value": "left"\
              },\
              "baseline": {\
                "value": "middle"\
              },\
              "text": {\
                "field": "data.value"\
              }\
            }\
          }\
        }\
      ]\
    }\
  ]\
}'));
</script>
</body>
</html>